<template>
    <el-row class="mt10">
        <el-col :span="5">
            <el-form-item class="" prop="keyword">
                <el-input placeholder="请输入搜索关键字" v-model="sobj.keyword"></el-input>
            </el-form-item>
        </el-col>
        <slot :sobj="sobj"></slot>
        <el-col :span="4" class="ml20">
            <el-button type="primary" @click="todoSearch">搜索</el-button>
            <el-button type="danger" @click="resetData">重置</el-button>
        </el-col>
    </el-row>
</template>


<script lang="ts" setup>
import { ref } from 'vue';
const props: any = defineProps({
    changeListData: Function
})
const emits: any = defineEmits()
const sobj = ref<any>({

})
const todoSearch = () => {
    console.log("123213")
    emits('search', sobj.value)
    props.changeListData && props.changeListData(sobj.value)
}
const resetData = () => {
    sobj.value = {}
    emits('reset')
    props.changeListData && props.changeListData()
}

defineExpose({
    sobj
})
</script>